package org.example.service;

import java.util.List;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import org.example.entity.QuestionInfoEntity;
import org.example.entity.RuleEntity;

public interface RuleService extends IService<RuleEntity> {

    IPage<RuleEntity> getRules(Integer pageNo, Integer pageSize);
    RuleEntity createRule(RuleEntity rule);        // 创建规则
    RuleEntity updateRule(Integer id, RuleEntity rule); // 更新规则
    void deleteRule(Integer id);         // 删除规则
    RuleEntity getRule(Integer id);        // 根据 ID 查询规则
    List<RuleEntity> getAllRules();         // 查询所有规则

    // 根据规则组题
    List<QuestionInfoEntity> getExamPaper(RuleEntity rule, int totalQuestions);

    // 基于科目组题
    List<QuestionInfoEntity> generatePracticePaperBySubject(String subject, int totalQuestions);

    // 基于学生的错误知识点组题
    List<QuestionInfoEntity> generatePracticePaperByWrongQuestions(Integer studentId, int totalQuestions);
}

